var IC={};

var localLoginInfor = localStorage.getItem("MU30-USERINFO");
var uid = localStorage['MU30-lOGIN-USRNAME']; 
var localstr = localStorage['MU30-userInfor-'+uid];
//alert(localstr);
IC.talkingDataCount = function(eventName,eventId){
    return;
	try {
		var username = "";
		var comName = "";	
		var depName = "";	
	        var objLocalstr = JSON.parse(localstr);
	        for(var i in objLocalstr){
	            var itemStr = objLocalstr[i];
	            if(itemStr){
					comName = objLocalstr.comName;
					depName = objLocalstr.depName;
	            }
	        }
	        var objLocalUserInfor = JSON.parse(localLoginInfor);
	        for(var i in objLocalUserInfor){
	            var item = objLocalUserInfor[i];
	            if(item){
	                username = objLocalUserInfor.username;
	            }
	        }
//	 alert(username+" / "+depName+" / "+comName);
		var dataTest = {
			"event_id": "移动地服",
			"label": "移动地服",
			"kv": [
				{
					"key": "账户名",
					"value": username
				},
				{
					"key": "分子公司",
					"value": comName
				},
				{
					"key": "部门",
					"value": depName
				},
				{
					"key": "应用名称",
					"value": "移动地服"
				},
				{
					"key": "事件名称",
					"value": eventName
				},
				{
					"key": "事件ID",
					"value": eventId
				},
				{
					"key": "触发时间",
					"value": IC.getDateCurrent()
				}
			]
		}
		uexTalkingData.userClickInfo(JSON.stringify(dataTest));	
		if(eventId!="0014")
		{
			uexEMM.setEvent(eventId,"{'':''}");
		}
	} 
	catch (e) {
		if (eventId != "0014") {
			uexEMM.setEvent(eventId,"{'':''}");
		}
	}
	
//	alert(" / "+dataTest);
}
/* 操作日期
---------------------------------------------------------------------------------------*/
//获取年
IC.getYear = function(date){
    if(date == undefined) date = new Date;
    return date.getFullYear();
};
//获取月
IC.getMonth = function(date){
    if(date == undefined) date = new Date;
    var month = date.getMonth() + 1;
    if(month < 10) month = "0" + month;
    return month;
};
//获取日
IC.getDay = function(date){
   if(date == undefined) date = new Date;
    var day = date.getDate();
    if(day < 10) day = "0" + day;
    return day;
};
//获取星期
IC.getWeek = function(date){
    if(date == undefined) date = new Date;
    var week = date.getDay();
    var weekArr = ["日","一","二","三","四","五","六"];
    return weekArr[week];
};
//获取小时
IC.getHours = function(date){
    if(date == undefined) date = new Date;
    return date.getHours();
};
//获取分钟
IC.getMinutes = function(date){
    if(date == undefined) date = new Date;
    return date.getMinutes();
};
//获取秒
IC.getSeconds = function(date){
	if(date == undefined) date = new Date;
	var seconds = date.getMinutes();
    if(seconds < 10) seconds = "0" + seconds;
    return seconds;	
}
//获取当前日期
IC.getDateToday = function(date){
    return IC.getYear() + "-" + IC.getMonth() + "-" + IC.getDay();
};
//获取当前日期
IC.getDateCurrent = function(date){
    return IC.getYear() + "." + IC.getMonth() + "." + IC.getDay() +" " +IC.checkTime(IC.getHours())+":"+IC.checkTime(IC.getMinutes())+":"+IC.getSeconds();
};
IC.checkTime = function(i){
    if(i<10) i = "0" + i;
    return i;
};